| <= (Less Than or Equal) The Less Than or Equal operator is used to determine whether or not the left operand is less than or equal to the right operand. If the left operand is less than or equal to the operand on the right, the returned value is true. If the left operand greater than the right operand, the result returned is false. If either of the two operands is of a data type other than a Number, an attempt is made to convert the operands to Numbers, then are evaluated. syntax: numberOne <= numberTwo EXAMPLE var operandOne = new String("67"); if (operandOne <=; 100) { document.write("The result is true") } else { document.write("The result is false") } This example declares a variable, variableOne, and stuffs it with the string "67". The Less Than or Equal operator is then used to determine whether the "67" (now converted to a Number data type) is less than or equal to the Number 100. Since it is, the if / else statement will return the message "The result is true". |